<html>
<header>Teacher Form</header>
<body>
    <?php
        $link = mysql_connect("localhost", "root","druman");
        if (!$link)
        {
            die('Could not connect: ' . mysql_error());
        }
        
        mysql_select_db("sasystemTables", $link);
    ?>
    <form action=teacher_form.php method=post>
        <p>
            First Name: <input type="text" name=first><br>Last Name: <input
                type="text" name=last>
        </p>
        <br> Class Name: <input type="text" name="class[]"><br>
        <br>
        <table>
            <tr>
                <td>Mon.</td>
                <td>Tue.</td>
                <td>Wed.</td>
                <td>Thu.</td>
                <td>Fri.</td>
            </tr>
            <tr>
                <td><input type="checkbox" name="days[]" value="mon"></td>
                <td><input type="checkbox" name="days[]" value="tue"></td>
                <td><input type="checkbox" name="days[]" value="wed"></td>
                <td><input type="checkbox" name="days[]" value="thu"></td>
                <td><input type="checkbox" name="days[]" value="fri"></td>
            </tr>
        </table>
            <h4>Time:</h4>
            Start: <select name="start_hour[]">
                <option value="6">6 am</option>
                <option value="7">7 am</option>
                <option value="8">8 am</option>
                <option value="9">9 am</option>
                <option value="10">10 am</option>
                <option value="11">11 am</option>
                <option value="12">12 pm</option>
                <option value="1">1 pm</option>
                <option value="2">2 pm</option>
                <option value="3">3 pm</option>
                <option value="4">4 pm</option>
            </select>: <select name="start_minute[]">
                <option value="0">00</option>
                <option value="5">05</option>
                <option value="10">10</option>
                <option value="15">15</option>
                <option value="20">20</option>
                <option value="25">25</option>
                <option value="30">30</option>
                <option value="35">35</option>
                <option value="40">40</option>
                <option value="45">45</option>
                <option value="50">50</option>
                <option value="55">55</option>
            </select> End: <select name="end_hour[]">
                <option value="6">6 am</option>
                <option value="7">7 am</option>
                <option value="8">8 am</option>
                <option value="9">9 am</option>
                <option value="10">10 am</option>
                <option value="11">11 am</option>
                <option value="12">12 pm</option>
                <option value="1">1 pm</option>
                <option value="2">2 pm</option>
                <option value="3">3 pm</option>
                <option value="4">4 pm</option>
            </select>: <select name="end_minute[]">
                <option value="0">00</option>
                <option value="5">05</option>
                <option value="10">10</option>
                <option value="15">15</option>
                <option value="20">20</option>
                <option value="25">25</option>
                <option value="30">30</option>
                <option value="35">35</option>
                <option value="40">40</option>
                <option value="45">45</option>
                <option value="50">50</option>
                <option value="55">55</option>
            </select>
        <h3>School</h3>
        <select name="schools">
        <?php
            $school_list = mysql_query("SELECT * FROM schools");
            
            while ($row = mysql_fetch_array($school_list))
            {
                echo "<option value=\"" . $row['userID'] . "\">" . $row['school'] . "</option>";
            }
        ?>
        </select>
    </form>

    <?php
    ?>

</body>
</html>